<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div class='app-container'>
    <el-form ref="form" :model="person_info" :rules="rules" label-width="100px" id="mvcfm">
      <el-button @click="gotoPage('/oa/humanresources/StaffMyselfUp?'+vueparams+'')" type='success' size="mini"><i class='fa fa-edit'></i>修改</el-button>
      <div class="form-unit">
        <span class="mvc-title-left"> 员工基本信息 </span>
      </div>
      <div>
        <el-row>
          <el-col :span="12">
            <el-form-item label="岗位" prop="">
              {{person_info.role}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="姓名" prop="">
              {{person_info.person_name}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="出生年月" prop="">
              {{person_info.person_birthday}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="性别" prop="">
              {{person_info.person_sex}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="民族" prop="">
              {{person_info.person_ethnic}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="政治面貌" prop="">
              {{person_info.person_politics}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="证件类别" prop="">
              {{person_info.person_papercate}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="证件号码" prop="">
              {{person_info.person_paperno}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="照片" prop="">
              {{person_info.file_id}}
            </el-form-item>
          </el-col>
        </el-row>
      </div>
      <div class="form-unit">
        <span class="mvc-title-left"> 员工通讯信息 </span>
      </div>
      <div>
        <el-row>
          <el-col :span="12">
            <el-form-item label="家庭实际住址" prop="">
              {{s_relation.relation_address}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="邮编" prop="">
              {{s_relation.relation_zip}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="电话" prop="">
              {{s_relation.relation_tel}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="手机" prop="">
              {{s_relation.relation_cel}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="E-mail" prop="">
              {{s_relation.relation_email}}
            </el-form-item>
          </el-col>
        </el-row>
      </div>
      <el-button @click="gotoPage('/oa/humanresources/StaffMyselfUp?'+vueparams+'')" type='success' size="mini"><i class='fa fa-edit'></i>修改</el-button>
    </el-form>
  </div>
</template>
<script>
  import request from '@/utils/request'
  export default {
    name: 'StaffMyselfDet',
    components: {},
    props: ['popparams'],
    data() {
      return {
        vueparams: this.getVUEParams(""),
        person_info: {
          role: null,
          person_name: null,
          person_birthday: null,
          person_sex: null,
          person_ethnic: null,
          person_politics: null,
          person_papercate: null,
          person_paperno: null,
          file_id: null,
        },
        s_relation: {
          relation_address: null,
          relation_zip: null,
          relation_tel: null,
          relation_cel: null,
          relation_email: null,
        },
        loading: false,
        rules: {}
      }
    },
    created() {
      this.getData();
    },
    updated() {},
    mounted() {},
    methods: {
      getData() {
        request({
          method: 'get',
          url: '/xcapi/VUEAction/oa/humanresources/EmployeeAction/staffMyselfDet?' + this.vueparams,
        }).then(data => {
          for (var k in data) {
            if (Array.isArray(data[k])) {
              this[k] = data[k];
            } else {
              $.extend(this[k], data[k]);
            }
          }
        })
      },
    },
  }
</script>
